﻿@model IEnumerable<SportsStore.Domain.Entities.Product>

@{
    ViewBag.Title = "Index";
    Layout = "~/Views/Shared/_AdminLayout.cshtml";
}
<h2>Index</h2>
<p>@Html.ActionLink("Create New", "Create")</p>
<table class="table">
    <tr>
        <th> @Html.DisplayNameFor(model => model.Name)</th>
        <th>@Html.DisplayNameFor(model => model.Description)</th>                  
        <th>@Html.DisplayNameFor(model => model.Price)</th>  
        <th>@Html.DisplayNameFor(model => model.Category)</th>
        <th>@Html.DisplayNameFor(model => model.ImageMimeType)</th>   
        <th></th>
    </tr>
@foreach (var item in Model) {
    <tr>
        <td> @Html.DisplayFor(modelItem => item.Name)</td>          
        <td>@Html.DisplayFor(modelItem => item.Description)</td>              
        <td> @Html.DisplayFor(modelItem => item.Price)</td>                
        <td>@Html.DisplayFor(modelItem => item.Category)</td>                
        <td> @Html.DisplayFor(modelItem => item.ImageMimeType)</td>                   
        <td>
            @Html.ActionLink("Edit", "Edit", new { id=item.ProductID }) |
            @Html.ActionLink("Details", "Details", new { id=item.ProductID }) |
            @Html.ActionLink("Delete", "Delete", new { id=item.ProductID })
        </td>
    </tr>
}
</table>
